'****************************
'* MaxiTrek v1.0 - Title    *
'* a game by Juri Fossaroli *
'* mpt@cbmzone.com          *
'****************************

Mode 4:Dim t$(2):Option error continue
Open "A:title.mod" For input As #1
If MM.Errno=0 Then Close 1:GoTo loadall

Copy "spchase.mod" To "a:title.mod"

loadall:
Sprite Load "title.spr"
PlayMOD "a:title.mod"
LoadBMP "title"
Line (0,12)-(181,12),1
t$(1)=" "+CLR$(2)+"<   Welcome to the incredible"+CLR$(4)+"  MaxiTrek V1.0   @ "
t$(1)=t$(1)+CLR$(2)+"created by "+CLR$(6)+"Juri Fossaroli   @ "+CLR$(2)
t$(1)=t$(1)+">The Arduitrons attacked your planet, it's time to counter "
t$(1)=t$(1)+"attack!!!  Destroy the entire Arduitrons force and free the "
t$(1)=t$(1)+"galaxy!"+String$(29,32)
t$(2)=CLR$(2)+"<Program, graphic and sfx by "+CLR$(6)+"Juri Fossaroli"+CLR$(2)
t$(2)=t$(2)+" title music by "+CLR$(6)+"The master/Silents dk"+CLR$(2)
t$(2)=t$(2)+"> press "+CLR$(3)+"I"+CLR$(2)+" to toggle the command list used "
t$(2)=t$(2)+"in game, press "+CLR$(3)+"SPACE"+CLR$(2)+" key to start the "
t$(2)=t$(2)+"game..."+String$(6,32)+CLR$(6)+"               GOOD LUCK!        @"
t$(2)=t$(2)+"     >"+String$(11,32)
SetTick 50,irq
l=0:c=1:w=0:wd=0:s=1:wdd=5:cnt=0:i=0

Do
cnt=cnt+1
If cnt=1 Then
  x=30+Int(Rnd(1)*180):y=(50-(x/9))+(Int(Rnd(1)*60))-(x/12):sc=Int(Rnd(1)*3)
EndIf
If cnt=20 And sc=2 Then Sprite on 7,x,y
If cnt=40 And sc=2 Then Sprite off 7:Sprite on 8,x,y
If cnt=60 And sc=2 Then Sprite off 8:Sprite on 9,x,y
If cnt=80 And sc=2 Then Sprite off 9:Sprite on 8,x,y
If cnt=100 And sc=2 Then Sprite off 8:Sprite on 7,x,y
If cnt=120 And sc=2 Then Sprite off 7
If cnt=20 And sc=1 Then Sprite on 1,x,y
If cnt=40 And sc=1 Then Sprite off 1:Sprite on 2,x,y
If cnt=60 And sc=1 Then Sprite off 2:Sprite on 3,x,y
If cnt=80 And sc=1 Then Sprite off 3:Sprite on 2,x,y
If cnt=100 And sc=1 Then Sprite off 2:Sprite on 1,x,y
If cnt=120 And sc=1 Then Sprite off 1
If cnt=20 And sc=0 Then Sprite on 4,x,y
If cnt=40 And sc=0 Then Sprite off 4:Sprite on 5,x,y
If cnt=60 And sc=0 Then Sprite off 5:Sprite on 6,x,y
If cnt=80 And sc=0 Then Sprite off 6:Sprite on 5,x,y
If cnt=100 And sc=0 Then Sprite off 5:Sprite on 4,x,y
If cnt=120 And sc=0 Then Sprite off 4
If cnt=140 Then cnt=0
a$=Inkey$
If a$="i" Then GoSub shwkys
If a$=" " Then GoSub rungame
Loop

shwkys:
If i=0 Then LoadBMP "ti",100,120:i=1:Return
If i=1 Then LoadBMP "tr",100,120:i=0:Return

rungame:
PlayMOD stop
Sprite off all
SetTick 0,0
Cls:Clear
Run "Game"
End

irq:
If c=500 Then c=1:l=0
If c=246 Then l=1:c=256
If s=0 And w=>0 Then w=w-1:IReturn
If w=-1 Then w=0:s=1
If wd=0 And l=0 And w=0 Then txt$=Mid$(t$(1),c,1):GoTo stampa
If wd=0 And l=1 And w=0 Then txt$=Mid$(t$(2),c-255,1):GoTo stampa
wd=wd-1:GoTo stampa2
stampa:
c=c+1:wd=wdd
If Asc(txt$)>127 And Asc(txt$)<136 Then cl=Asc(txt$)-128
If txt$="@" Then s=0:w=30:txt$="":IReturn
If txt$="<" Then s=1:wdd=5:txt$=""
If txt$=">" Then s=2:wdd=2:txt$=""
stampa2:
BLIT 0,0,-1*s,0,181,12:Print @(174+(wd*s),0)Chr$(128+cl)txt$
Line (179,0)-(186,11),0,bf:Line (181,0)-(181,11),1
IReturn
